package org.monkey.request.plugin.aspect;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.monkey.request.plugin.entity.ResLog;

@Data
@NoArgsConstructor
public class LogAnnotationParser {

  private String before = "";
  private String after = "";
  private boolean disable = false;
  private boolean requestParse = true;
  private boolean responseParse = true;
  private boolean headerParse = false;
  private String tags;

  public LogAnnotationParser(ResLog resLog) {
    if (resLog != null) {
      this.before = resLog.before();
      this.after = resLog.after();
      this.disable = resLog.disable();
      this.requestParse = resLog.requestParse();
      this.responseParse = resLog.responseParse();
      this.headerParse = resLog.headerParse();
      this.tags = resLog.tags();
    }
  }
}
